---
title: Build a model factory with Python multithreading
description: Learn how to use the Python threading library to build a model factory.

---

# Build a model factory with Python multithreading {: #build-a-model-factory-with-python-multithreading }

[Access this AI accelerator on GitHub <span style="vertical-align: sub">:material-arrow-right-circle:{.lg }</span>](https://github.com/datarobot-community/ai-accelerators/blob/main/advanced_ml_and_api_approaches/model-factory-with-python-native-multithreading/Model Factory with Python Multithreading.ipynb){ .md-button }

Model training in the DataRobot platform is an I/O-bound task that can be time consuming depending on the project configuration and the type of models to be trained.

Working under tough deadlines and needing to train tens or hundreds of projects (for example, at an SKU level) requires building model factories and leads to the mandatory requirement to significantly decrease training time.

This can be achieved on the base of a multithreaded approach and is demonstrated on the example of this AI Accelerator that leverages a Python multithreading library.
